# -*- coding: utf-8 -*-

%if c.category is not None:
${h.start_form(h.url(action='update', id=c.category.id))}
 <table bgcolor="#E6E8F8" width="100%">
    <tr><td colspan='3' class='info'>Редактирование типа: "${c.category.name}"</td></tr>
    <tr><td width="10%"><b>Наименование: </b></td><td><input name='name' value='${c.category.name}' size='50' class='BoxCenter' type='text'></td><td><div id='name${c.category.id}' class='error'></td></tr>
    %if c.category.note is not None:
        <tr><td><b>Примечание: </b></td><td><textarea name='note' cols='50' rows='3' class='BoxCenter'>${c.category.note}</textarea></td><td><div id='note${c.category.id}' class='error'></td></tr>
    %else:
        <tr><td><b>Примечание: </b></td><td><textarea name='note' cols='50' rows='3' class='BoxCenter'></textarea></td><td><div id='note${c.category.id}' class='error'></td></tr>
    %endif        
    <tr><td></td><td>
    <input value="Закрыть" class="BoxCenter" onclick='document.getElementById("fullview${c.category.id}").innerHTML="";' align="alleft" type="reset">
%else:
${h.start_form(h.url(action='create'))}
 <table width="100%" class="BoxCenterAdd">
    <tr><td colspan='3' class='info'>Добавление типа</td></tr>
    <tr><td width="10%"><b>Наименование: </b></td><td><input name='name' value='' size='50' class='BoxCenter' type='text'></td><td><div id='name' class='error'></td></tr>    
    <tr><td><b>Примечание: </b></td><td><textarea name='note' cols='50' rows='3' class='BoxCenter'></textarea></td><td><div id='note' class='error'></td></tr>
    <tr><td></td><td>    
    <input value="Закрыть" class="BoxCenter" onclick='document.getElementById("add").innerHTML="";' align="alleft" type="reset">
%endif
   <input value="Сохранить" type="submit" class="BoxCenter">
 </td></tr>
</table>
${h.end_form()}
